import Vue from 'vue';
import App from './App.vue';
import router from './router';
import { List } from 'vant';
import { 
  Search, 
  Tabs, 
  Tab, 
  Grid, 
  GridItem, 
  Image as VanImage,
  Loading,
  Empty,
  Swipe,
  SwipeItem,
  Cell,
  CellGroup,
  Popup
} from 'vant'
import 'vant/lib/index.css'
import '@/assets/css/normalize.css'
// import '@/utils/rem'

const components = [
  Search,
  Tabs,
  Tab,
  Grid,
  GridItem,
  VanImage,
  Loading,
  Empty,
  Swipe,
  SwipeItem,
  Cell,
  CellGroup,
  Popup,
];

Vue.use(List);
components.forEach((component) => {
  Vue.component(component.name, component);
});
if (process.env.NODE_ENV === 'development') {
  require('./mock')
}
new Vue({
  router,
  render: h => h(App),
}).$mount('#app');
